﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace TwitterBEIS_SL3_SLApp
{
    public partial class Tweet : UserControl
    {
        public Tweet()
        {
            InitializeComponent();
        }

        public Tweet(string image, string name, string text, string time)
        {
            InitializeComponent();
            SetTweet(image, name, text, time);
        }

        public void SetTweet(string image, string name, string text, string time)
        {
            if(image!=null)
                Image.Source = new BitmapImage(new Uri(image, UriKind.Absolute));
            UName.Text = name + ":";
            Text.Text = text;
            Time.Text = time;
        }
    }
}
